package com.xiaocg.command;

import java.util.ArrayList;
import java.util.List;

/**
 * 请求者角色
 */
public class Waiter {
    private List<CommandDemo> commandDemos = new ArrayList<>();

    public void setCommandDemos(CommandDemo commandDemo) {
        commandDemos.add(commandDemo);
    }

    public void orderUp(){
        System.out.println("-----已经下单了");
        commandDemos.forEach(CommandDemo::execute);
    }
}
